package com.yanqu.road.server.cmd;

import com.yanqu.road.player.PlayerControl;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.command.Command;

import io.netty.channel.ChannelHandlerContext;

@Cmd(code = Protocol.A_KICK_OUT_PLAYER, desc = "踢玩家下线")
public class KickOutPlayerCmd implements Command {

	@Override
	public void execute(ChannelHandlerContext ctx, YanQuMessage packet) throws Exception {
		long userId = packet.getPlayerId();
		PlayerControl.kickOutPlayer(userId);
	}

}
